home *** CD-ROM | disk | FTP | other *** search
/ AppleScript - The Beta Release / AppleScript - The Beta Release.iso / Development Tools / Interfaces / PInterfaces / AppleScript.p < prev    next >
Text File  |  1992-11-02  |  3KB  |  111 lines

  1. {
  2. ////////////////////////////////////////////////////////////////////////////////
  3. // OPEN SCRIPTING ARCHITECTURE: Client Interface
  4. ////////////////////////////////////////////////////////////////////////////////
  5. // Copyright © 1992 Apple Computer, Inc. All rights reserved.
  6. // Authors: Jens Alfke, William Cook, Donn Denman, and Warren Harris
  7. ////////////////////////////////////////////////////////////////////////////////
  8. // This interface defines what it means to be a "scripting component."
  9. // Scripting components allow "scripts" to be loaded and executed.  This
  10. // interface does not define the way in which a particular scripting
  11. // component's scripts are editing and debugged.
  12. ////////////////////////////////////////////////////////////////////////////////
  13. }
  14.  
  15. {$IFC UNDEFINED UsingIncludes}
  16. {$SETC UsingIncludes := 0}
  17. {$ENDC}
  18.  
  19. {$IFC NOT UsingIncludes}
  20.     UNIT AppleScript;
  21.     INTERFACE
  22. {$ENDC}
  23.  
  24. {$IFC UNDEFINED UsingAppleScript}
  25. {$SETC UsingAppleScript := 1}
  26.  
  27. {$I+}
  28. {$SETC AppleScriptIncludes := UsingIncludes}
  29. {$SETC UsingIncludes := 1}
  30. {$IFC UNDEFINED UsingAppleEvents}
  31. {$I $$Shell(PInterfaces)AppleEvents.p}
  32. {$ENDC}
  33. {$IFC UNDEFINED UsingComponents}
  34. {$I $$Shell(PInterfaces)Components.p}
  35. {$ENDC}
  36. {$SETC UsingIncludes := AppleScriptIncludes}
  37.  
  38. { Types and Constants }
  39. CONST
  40.     typeAppleScript                        = 'ascr';
  41.     kAppleScriptSubtype                    = typeAppleScript;
  42.     typeASSourceType                    = typeChar;
  43.     typeASStorage                        = typeAppleScript;
  44.  
  45. { Component Selectors }
  46.     kASSelectInit                        = $1001;
  47.     kASSelectSetSourceStyles            = $1002;
  48.     kASSelectGetSourceStyles            = $1003;
  49.     kASSelectGetSourceStyleNames        = $1005;
  50.  
  51. { Initialization }
  52.  
  53. FUNCTION
  54. ASInit(scriptingComponent    : ComponentInstance;
  55.        modeFlags            : LONGINT;
  56.        minStackSize            : LONGINT;
  57.        preferredStackSize    : LONGINT;
  58.        maxStackSize            : LONGINT;
  59.        minHeapSize            : LONGINT;
  60.        preferredHeapSize    : LONGINT;
  61.        maxHeapSize            : LONGINT)
  62.     : OSAError;
  63.     INLINE $2F3C, $001C, $1001, $7000, $A82A;
  64.  
  65. { Default Initialization Parameters }
  66. CONST
  67.     kASDefaultMinStackSize                =  1 * 1024;
  68.     kASDefaultPreferredStackSize        =  4 * 1024;
  69.     kASDefaultMaxStackSize                = 16 * 1024;
  70.     kASDefaultMinHeapSize                =  4 * 1024;
  71.     kASDefaultPreferredHeapSize            = 64 * 1024;
  72.     kASDefaultMaxHeapSize                = 32 * 1024 * 1024;
  73.  
  74. { Source Styles }
  75.  
  76. FUNCTION
  77. ASSetSourceStyles(scriptingComponent    : ComponentInstance;
  78.                   sourceStyles            : STHandle)
  79.     : OSAError;
  80.     INLINE $2F3C, $0004, $1002, $7000, $A82A;
  81.  
  82. FUNCTION
  83. ASGetSourceStyles(scriptingComponent        : ComponentInstance;
  84.                   VAR resultingSourceStyles    : STHandle)
  85.     : OSAError;
  86.     INLINE $2F3C, $0004, $1003, $7000, $A82A;
  87.  
  88. ASGetSourceStyleNames(scriptingComponent                : ComponentInstance;
  89.                       modeFlags                            : LONGINT;
  90.                       VAR resultingSourceStyleNamesList    : AEDescList)
  91.     : OSAError;
  92.     INLINE $2F3C, $0008, $1004, $7000, $A82A;
  93.  
  94. CONST
  95.     kASSourceStyleUncompiledText            = 0;
  96.     kASSourceStyleNormalText                = 1;
  97.     kASSourceStyleLanguageKeyword            = 2;
  98.     kASSourceStyleApplicationKeyword        = 3;
  99.     kASSourceStyleComment                    = 4;
  100.     kASSourceStyleLiteral                    = 5;
  101.     kASSourceStyleParameter                    = 6;
  102.     kASSourceStyleUserSymbol                = 7;
  103.     kASSourceStyleAlias                        = 8;
  104.     kASNumberOfSourceStyles                    = 9;
  105.  
  106. {$ENDC}    { UsingAppleScript }
  107.  
  108. {$IFC NOT UsingIncludes}
  109.     END.
  110. {$ENDC}
  111.